/*****************************************************************************

File:   SurfaceDescsExtrudeP10.java

Date          Build     Author        Version    Comments
27-Dec-12    P-20-20    dshah          $$1        Created

****************************************************************************/
package com.ptc.otkjavaexamples;
import com.ptc.pfc.pfcGeometry.*;
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcCommand.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcModel.*;
import com.ptc.pfc.pfcModelItem.*;
import com.ptc.pfc.pfcFeature.*;
import com.ptc.pfc.pfcSolid.*;
import java.io.*;

import com.ptc.pfc.pfcFamily.*;
import com.ptc.pfc.pfcServer.*;
import com.ptc.pfc.pfcWindow.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.pfc.pfcBase.*;
import com.ptc.wfc.wfcModel.*;
import com.ptc.wfc.wfcGeometry.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.wfc.wfcPart.*;
import com.ptc.pfc.pfcPart.*;
import com.ptc.pfc.pfcDimension.*;
import com.ptc.pfc.pfcAssembly.*;
import com.ptc.pfc.pfcSelect.*;
import com.ptc.pfc.pfcUnits.*;
import com.ptc.pfc.pfcObject.*;
import com.ptc.pfc.pfcUI.*;
import com.ptc.pfc.pfcRelations.*;
import com.ptc.pfc.pfcDetail.*;
import com.ptc.pfc.pfcDrawing.*;
import com.ptc.pfc.pfcView.*;
import com.ptc.pfc.pfcView2D.*;
import com.ptc.pfc.pfcModel2D.*;

class SurfaceDescsExtrudeP10
{

	public SurfaceDescsExtrudeP10()
	{
	}

	public static WSurfaceDescriptors OtkUtilSurfaceDescriptorCreate()
	{
		try
		{
 		WSurfaceDescriptors wSurfDescs = WSurfaceDescriptors.create();
		int[] nums;

		ContourDescriptors WSContDescs1 = ContourDescriptors.create();
		intseq WSEdgeIds1 = intseq.create();

		nums = new int [2];
		nums[0] = 44;
		nums[1] = 45;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds1, 2, nums);
		ContourDescriptor WSContDesc1 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds1);
		WSContDescs1.append(WSContDesc1);

		// SURFACE_PLANE
		Vector3D  WSXAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSZAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WSorigin1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );
		Matrix3D  WSMatrixD1 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0); 
		Transform3D   WSTransformD1 = pfcBase.Transform3D_Create(WSMatrixD1);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis1, WSYAxis1,WSZAxis1, WSorigin1, WSTransformD1);


		UVParams  WSUVParam11 = otkCreateIntfDataUtils.CreatePfcUVParams(-77.67718952905392, -45.29695117712066);
		UVParams  WSUVParam21 = otkCreateIntfDataUtils.CreatePfcUVParams(77.67718952905392, 110.05742788098718);
		UVOutline  WSUVOutline1 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam11, WSUVParam21);
		SurfaceExtents  WSSurfaceExtents1 = pfcGeometry.SurfaceExtents_Create (WSUVOutline1);
		WPlaneDescriptor  WSPlaneDesc1 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents1, SurfaceOrientation.SURFACEORIENT_INWARD, WSTransformD1, 43, WSContDescs1); 

		WSurfaceDescriptor  WSSurfDesc1 = (WSurfaceDescriptor)(WSPlaneDesc1);


		wSurfDescs.append(WSSurfDesc1);


		ContourDescriptors WSContDescs2 = ContourDescriptors.create();
		intseq WSEdgeIds2 = intseq.create();

		nums = new int [4];
		nums[0] = 44;
		nums[1] = 50;
		nums[2] = 47;
		nums[3] = 52;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds2, 4, nums);
		ContourDescriptor WSContDesc2 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds2);
		WSContDescs2.append(WSContDesc2);

		// SURFACE_CYLINDER
		Vector3D  WSXAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSZAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WSorigin2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 32.38023835193326 , 0.0 );
		Matrix3D  WSMatrixD2 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,32.38023835193326,0.0,1.0); 
		Transform3D   WSTransformD2 = pfcBase.Transform3D_Create(WSMatrixD2);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis2, WSYAxis2,WSZAxis2, WSorigin2, WSTransformD2);


		UVParams  WSUVParam12 = otkCreateIntfDataUtils.CreatePfcUVParams(-0.06283185307179587, -5.0468);
		UVParams  WSUVParam22 = otkCreateIntfDataUtils.CreatePfcUVParams(3.204424506661589, 257.3868);
		UVOutline  WSUVOutline2 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam12, WSUVParam22);
		SurfaceExtents  WSSurfaceExtents2 = pfcGeometry.SurfaceExtents_Create (WSUVOutline2);
		WCylinderDescriptor  WSCylinDesc2 = wfcGeometry.WCylinderDescriptor_Create(WSSurfaceExtents2, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD2, 74.689605316398, 49, WSContDescs2); 


		WSurfaceDescriptor  WSSurfDesc2 = (WSurfaceDescriptor)(WSCylinDesc2);


		wSurfDescs.append(WSSurfDesc2);


		ContourDescriptors WSContDescs3 = ContourDescriptors.create();
		intseq WSEdgeIds3 = intseq.create();

		nums = new int [4];
		nums[0] = 45;
		nums[1] = 52;
		nums[2] = 48;
		nums[3] = 50;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds3, 4, nums);
		ContourDescriptor WSContDesc3 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds3);
		WSContDescs3.append(WSContDesc3);

		// SURFACE_CYLINDER
		Vector3D  WSXAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSZAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WSorigin3 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 32.38023835193326 , 0.0 );
		Matrix3D  WSMatrixD3 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,32.38023835193326,0.0,1.0); 
		Transform3D   WSTransformD3 = pfcBase.Transform3D_Create(WSMatrixD3);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis3, WSYAxis3,WSZAxis3, WSorigin3, WSTransformD3);


		UVParams  WSUVParam13 = otkCreateIntfDataUtils.CreatePfcUVParams(3.078760800517997, -5.0468);
		UVParams  WSUVParam23 = otkCreateIntfDataUtils.CreatePfcUVParams(6.346017160251382, 257.3868);
		UVOutline  WSUVOutline3 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam13, WSUVParam23);
		SurfaceExtents  WSSurfaceExtents3 = pfcGeometry.SurfaceExtents_Create (WSUVOutline3);
		WCylinderDescriptor  WSCylinDesc3 = wfcGeometry.WCylinderDescriptor_Create(WSSurfaceExtents3, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD3, 74.689605316398, 51, WSContDescs3); 


		WSurfaceDescriptor  WSSurfDesc3 = (WSurfaceDescriptor)(WSCylinDesc3);


		wSurfDescs.append(WSSurfDesc3);


		ContourDescriptors WSContDescs4 = ContourDescriptors.create();
		intseq WSEdgeIds4 = intseq.create();

		nums = new int [2];
		nums[0] = 47;
		nums[1] = 48;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds4, 2, nums);
		ContourDescriptor WSContDesc4 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds4);
		WSContDescs4.append(WSContDesc4);

		// SURFACE_PLANE
		Vector3D  WSXAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSZAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WSorigin4 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 252.34 );
		Matrix3D  WSMatrixD4 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,252.34,1.0); 
		Transform3D   WSTransformD4 = pfcBase.Transform3D_Create(WSMatrixD4);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis4, WSYAxis4,WSZAxis4, WSorigin4, WSTransformD4);


		UVParams  WSUVParam14 = otkCreateIntfDataUtils.CreatePfcUVParams(-77.67718952905392, -45.29695117712066);
		UVParams  WSUVParam24 = otkCreateIntfDataUtils.CreatePfcUVParams(77.67718952905392, 110.05742788098718);
		UVOutline  WSUVOutline4 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam14, WSUVParam24);
		SurfaceExtents  WSSurfaceExtents4 = pfcGeometry.SurfaceExtents_Create (WSUVOutline4);
		WPlaneDescriptor  WSPlaneDesc4 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents4, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD4, 46, WSContDescs4); 

		WSurfaceDescriptor  WSSurfDesc4 = (WSurfaceDescriptor)(WSPlaneDesc4);


		wSurfDescs.append(WSSurfDesc4);

		return(wSurfDescs);

		}
		catch (Exception e)
		{
		System.out.println(e);
		}
		return null;
	}
};
